package com.yxym.wrapper;

public class WrapperExercise02 {
    public static void main(String[] args) {
        Integer i = new Integer(1);
        Integer j = new Integer(1);
        System.out.println(i==j);//F
        //看范围就直接返回-128-127
        Integer m = 1;//底层Integer.valueOf(1);阅读源码
        Integer n = 1;//底层Integer.valueOf(1);
        System.out.println(m==n);//T
        //主要看范围-128到127就直接返回
        //否则就new Integer(xxx);
        Integer x = 128;
        Integer y = 128;
        System.out.println(x == y);//F
    }
}
